package com.jxj.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jxj.entity.OrganizationInfoVO;
import com.jxj.entity.Resp;
import com.jxj.entity.gen.TOrganizationMsg;
import com.jxj.service.OrganizationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author Cambria
 * @creat 2021/9/6 14:54
 */
@Slf4j
@RestController
public class OrgController {
    @Autowired
    OrganizationService organizationService;

    /**
     * 根据分类查询组织信息，业务逻辑太简单了就不写个service方法了0.0
     * @param class_one
     * @param class_two
     * @return
     */
    @GetMapping({"/orgclass"})
    public Resp<OrganizationInfoVO[]> getOrgClass(String class_one , String class_two) {
        return new Resp<>(HttpStatus.OK , organizationService.selectOrgByClass12(class_one , class_two).toArray(new OrganizationInfoVO[0]));
    }
}
